﻿using System.Windows;
using GalaSoft.MvvmLight.Threading;
using MiData;

namespace VolunteerManager
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        static App()
        {
            DispatcherHelper.Initialize();
        }

        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            Model.Config.PhotoRoot = System.Environment.CurrentDirectory + "\\photo\\";
            string path = "volunt.db";
            BaseDBAdapter DBAdapter = new
               MiData.SqliteMiDBAdapter("Data Source=" + path);
            //this.conn.SetPassword("nopassword");
            
            MiData.MiActiveRecord.DB = DBAdapter;
            DBAdapter.Open();
        }
    }
}
